package wsi.dataguide.tree;

public class XmlObjectFunctionality {

	private int numerator;
	private int denominator;

	public XmlObjectFunctionality() {

	}

	public int getDenominator() {
		return denominator;
	}

	public double getFunctionality() {
		return 1. * numerator / denominator;

	}

	public int getNumerator() {
		return numerator;
	}

	public void setDenominator(int denominator) {
		this.denominator = denominator;
	}

	public void setNumerator(int numerator) {
		this.numerator = numerator;
	}

	@Override
	public String toString() {
		return String.format("%.4f = %d / %d",
				denominator != 0 ? getFunctionality() : Double.NaN, numerator,
				denominator);
	}
}
